using MicroMsg.Manager;
using MicroMsg.Resource.@string;
using MicroMsg.Storage;
using System;
using System.Windows.Media;
namespace MicroMsg.UI.UserContrl
{
	public class CardMsgInfo
	{
		public string username;
		public string nickname;
		public string fullpy;
		public string shortpy;
		public int imagestatus;
		public int scene;
		public string province;
		public string city;
		public string sign;
		public int percard;
		public int int_0;
		public int certflag;
		public string alias;
		public string certinfo;
		public string brandHomeUrl;
		public string brandIconUrl;
		public string UserName
		{
			get
			{
				if (!string.IsNullOrEmpty(this.username))
				{
					return this.username;
				}
				return "";
			}
		}
		public string Title
		{
			get
			{
				return strings.MessageShareCard;
			}
		}
		public string NickName
		{
			get
			{
				if (string.IsNullOrEmpty(this.nickname))
				{
					return this.username;
				}
				return this.nickname;
			}
		}
		public ImageSource FlagImg
		{
			get
			{
				return new ImageSourceConverter().ConvertFromString("/Resource/Img/Chat/flagFriendRecomend.png") as ImageSource;
			}
		}
		public string UserInfo
		{
			get
			{
				if (!string.IsNullOrEmpty(this.alias))
				{
					return string.Format(strings.FMsgWeiXinId, this.alias);
				}
				if (!string.IsNullOrEmpty(this.username))
				{
					return string.Format(strings.FMsgWeiXinId, this.username);
				}
				return "";
			}
		}
		public string ConversationInfo(ChatMsg chatMsg_0, string senderusername)
		{
			if (chatMsg_0 == null)
			{
				return "";
			}
			string nickName = this.NickName;
			if (chatMsg_0.nIsSender == 1)
			{
				return string.Format(strings.Chat_ShareMyFriend_Send, ContactHelper.getDisplayName(chatMsg_0.strTalker, null), nickName);
			}
			return string.Format(strings.Chat_ShareMyFriend_Recv, ContactHelper.getDisplayName(senderusername, null), nickName);
		}
	}
}
